<?php


class Mvc{
    private $control;
    private $action;
    private $get;

    public function __construct($control='ControlBase',$action='index',$get){

        $control=ucfirst($control.'Controller');
        if(!@include(dirname(__DIR__).'/controllers/'.$control.'.php')){
            throw exception ("404 not found!!!");
        }
        $this->control= new $control();
        $this->action=$action;
        $this->get=$get;
    }

    public function run(){
        $action=$this->action;
        $this->control->$action($this->get);
    }
}
?>
